#ifndef __arena_jumping_ball_h__
#define __arena_jumping_ball_h__

#include <string>
#include <vector>

#include "arena_base.h"

class Predictor_link;

class Arena_jumping_ball: public Arena_base
{
public:
  Arena_jumping_ball();
  ~Arena_jumping_ball();

  void update(float time);

  void reset(void);

  void push(float force);

  boost::function<void(float)> function_set_force( void );

  float *get_ball_x_position_p(void);
  float *get_ball_y_position_p(void);
  float *get_ball_x_velocity_p(void);
  float *get_ball_y_velocity_p(void);
  float *get_position_p(void);
  float *get_velocity_p(void);

private:
  // state variables
  float _position;
  float _velocity;
  float _ball_x_position;
  float _ball_y_position;
  float _ball_x_velocity;
  float _ball_y_velocity;

  // forcing
  float _F;

  // parameters
  float _g;
  float _mass_cart;
  float _width_cart;

  void update_state(float time);
  void update_arena(void);

};

#endif
